package service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import entity.Users;
import mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import service.UserService;

import java.util.List;


@Service //暴露服务（向zookeeper注册服务）
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public int register(Users users) {
        return userMapper.register(users);
    }

    @Override
    public List<Users> findByName(String name) {
        return userMapper.findByName(name);
    }

    @Override
    public int update(Users users) {
        return userMapper.update(users);
    }

    @Override
    public int delete(Integer id) {
        return userMapper.delete(id);
    }

    @Override
    public List<Users> findAll() {
        return userMapper.findAll();
    }
}
